<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="__PUBLIC__/js/jquery.js"></script>
    <script type="text/javascript" src="__PUBLIC__/js/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" src="__PUBLIC__/js/ueditor/ueditor.all.js"></script>
    <style>
        #content1{
            width: 1020px;
            height: 400px;
        }
    </style>
</head>

<layout name="Iflayout"/>
<div class="xyh-content">

    <div class="row">
        <div class="col-lg-12">
            <h3 class="page-header"><em class="glyphicon glyphicon-cloud-upload"></em>
                修改文章
            </h3>
        </div>
    </div>


    <div class="row">
        <div class="col-lg-12">

            <form method='post' class="form-horizontal" id="form_do" name="form_do" action="/xyhai.php?s=/Article/edit">

                <div class="form-group">
                    <label for="inputTtitle" class="col-sm-2 control-label">标题</label>
                    <div class="col-sm-9">
                        <input type="text" name="title" id="inputTtitle" value="{$list['title']}" class="form-control" placeholder="标题" required="required" />
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputShorttitle" class="col-sm-2 control-label">副标题</label>
                    <div class="col-sm-9">
                        <input type="text" name="shorttitle" id="inputShorttitle" value="" class="form-control" placeholder="副标题" />
                    </div>
                </div>

                <div class="form-group">
                    <label for="inputColor" class="col-sm-2 control-label">标题颜色</label>
                    <div class="col-sm-5">
                        <input type="text" name="color" id="inputColor" value="" class="form-control  iColorPicker" placeholder="标题颜色" />
                    </div>
                </div>

                <div class="form-group">
                    <label for="inputColor" class="col-sm-2 control-label">自定义属性</label>
                    <div class="col-sm-9">
                        <label class="checkbox-inline"><input type='checkbox' name='flags[]' value='1'   /> 图片</label><label class="checkbox-inline"><input type='checkbox' name='flags[]' value='2'   /> 头条</label><label class="checkbox-inline"><input type='checkbox' name='flags[]' value='4'   /> 推荐</label><label class="checkbox-inline"><input type='checkbox' name='flags[]' value='8'   /> 特荐</label><label class="checkbox-inline"><input type='checkbox' name='flags[]' value='16'   /> 幻灯</label><label class="checkbox-inline"><input type='checkbox' name='flags[]' value='32' id="CK_JumpUrl"  /> 跳转</label><label class="checkbox-inline"><input type='checkbox' name='flags[]' value='64'   /> 其他</label>
                    </div>
                </div>

                <div class="form-group" id="JumpUrlDiv" style="display:none;">
                    <label for="inputJumpurl" class="col-sm-2 control-label">跳转网址</label>
                    <div class="col-sm-9">
                        <input type="text" name="jumpurl" id="inputJumpurl" value="" class="form-control" placeholder="跳转网址" />
                    </div>
                </div>

                <div class="form-group">
                    <label for="inputProName" class="col-sm-2 control-label">所属栏目</label>
                    <div class="col-sm-9">
                        <select name="cid" class="form-control">
                            <option value="2" >新闻中心</option>
                            <option value="3" selected="selected">———公司新闻</option>
                            <option value="4" >———行业新闻</option>							</select>
                    </div>
                </div>

                <div class="form-group">
                    <label for="litpic" class="col-sm-2 control-label">缩略图</label>
                    <div class="col-sm-5">
                        <input type="text" class="form-control" name="litpic" id="litpic"   value="" placeholder="缩略图地址" />
                    </div>
                    <div class="col-sm-5">
                        <button class="btn btn-primary" type="button" id="BrowerPicture"><em class="glyphicon glyphicon-plus-sign"></em> 选择站内图片</button>
                        <div class="btn btn-success up-picture-btn">
                            <span><em class="glyphicon glyphicon-plus-sign"></em>添加图片</span>
                            <input id="fileupload" type="file" name="mypic">
                        </div>
                    </div>
                </div>


                <div class="form-group">
                    <label for="" class="col-sm-2 control-label"></label>
                    <div class="col-sm-9">
                        <div class="litpic_tip"></div>
                        <div id="litpic_show">
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label for="inputKeywords" class="col-sm-2 control-label">关键词</label>
                    <div class="col-sm-9">
                        <input type="text" name="keywords" id="inputKeywords" class="form-control" value="" placeholder="多关键词之间用“,”隔开" />
                    </div>
                </div>

                <div class="form-group">
                    <label for="inputDescription" class="col-sm-2 control-label">摘要</label>
                    <div class="col-sm-9">
                        <textarea name="description" id="inputDescription" class="form-control">{$list['description']}</textarea>
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputAuthor" class="col-sm-2 control-label">作者</label>
                    <div class="col-sm-9">
                        <input type="text" name="author" id="inputAuthor" class="form-control"  value="" placeholder="作者" />
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputCopyfrom" class="col-sm-2 control-label">来源</label>
                    <div class="col-sm-9">
                        <input type="text" name="copyfrom" id="inputCopyfrom" class="form-control"  value="" placeholder="来源" />
                    </div>
                </div>

                <div class="form-group">
                    <label for="inputContent" class="col-sm-2 control-label">内容</label>
                    <div class="col-sm-9">
                        <textarea name="content" id="inputContent" style="height: 370px;">{$list['content']}</textarea>
                    </div>
                </div>

                <div class="form-group">
                    <label for="inputPublishtime" class="col-sm-2 control-label">发布时间</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" name="publishtime" id="inputPublishtime" value="{$list['publishtime']|date='Y-m-d H:i:s',###}">
                        <script type="text/javascript">
                            Calendar.setup({
                                weekNumbers: true,
                                inputField : "inputPublishtime",
                                trigger    : "inputPublishtime",
                                dateFormat: "%Y-%m-%d %H:%M:%S",
                                showTime: true,
                                minuteStep: 1,
                                onSelect   : function() {this.hide();}
                            });
                        </script>
                    </div>
                </div>


                <div class="form-group">
                    <label for="inputName" class="col-sm-2 control-label">评论</label>
                    <div class="col-sm-9">
                        <label class="radio-inline">
                            <input type="radio" name="commentflag" value="1" checked="checked" />允许
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="commentflag" value="0"   />禁止
                        </label>
                    </div>
                </div>

                <div class="row margin-botton-large">
                    <div class="col-sm-offset-2 col-sm-9">
                        <input type="hidden" name="id" value="16" />
                        <input type="hidden" name="pid" value="2" />
                        <div class="btn-group">
                            <button type="submit" class="btn btn-primary"> <i class="glyphicon glyphicon-saved"></i>
                                保存
                            </button>
                            <button type="button" onclick="goUrl('/xyhai.php?s=/Article/index')" class="btn btn-default"> <i class="glyphicon glyphicon-chevron-left"></i>
                                返回
                            </button>
                        </div>
                    </div>
                </div>

            </form>

        </div>
    </div>






</div>


<script type="text/javascript">

    var ue = UE.getEditor('inputContent');
    ue.ready(function() {
        ue.setHeight(250);
        //设置编辑器的内容
        // ue.setContent('hello');
        // //获取html内容，返回: <p>hello</p>
        // var html = ue.getContent();
        //获取纯文本内容，返回: hello
        // var txt = ue.getContentTxt();
    });

</script>
